/**
 * Copyright (C), 2018 store
 * Encoding: UTF-8
 * Date: 20-4-26 下午2:25
 * History:
 */
package com.swak.frame.mybatis.config;

import java.util.List;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.validation.annotation.Validated;
import com.swak.frame.mybatis.constants.SwakDataBaseConstants;

/**
 * @ClassName: SwakDataBasePropertie.java
 * @author: colley.ma
 * @date: 2022/03/16 15:32:52
 */
@ConfigurationProperties(prefix = SwakDataBaseConstants.CONFIG)
@Validated
public class SwakDataBasePropertie {
    
	/**
	 * master主库
	 */
	@NotBlank
    private String master;

	/**
	 * 备库slaves
	 */
    private List<String> slaves;

    /**
     * sqlmap-config path
     */
    @NotBlank
    private String configLocation;

    /**
     * sqlmapper path
     */
    @NotEmpty
    private String[] mapperLocations;

    public String getMaster() {
        return master;
    }

    public void setMaster(String master) {
        this.master = master;
    }

    public List<String> getSlaves() {
        return slaves;
    }

    public void setSlaves(List<String> slaves) {
        this.slaves = slaves;
    }

    public String getConfigLocation() {
        return configLocation;
    }

    public void setConfigLocation(String configLocation) {
        this.configLocation = configLocation;
    }

    public String[] getMapperLocations() {
        return mapperLocations;
    }

    public void setMapperLocations(String[] mapperLocations) {
        this.mapperLocations = mapperLocations;
    }
}
